<include file="Public/head"/>
<link href="__PUBLIC__/layui/css/layui.css" rel="stylesheet" type="text/css" />
<body class="no-skin">
<include file="Public/header"/>
<div class="main-container" id="main-container">
<style>
table th{
    font-size: 18px;
    color:#000;
}
table td{
    font-size: 15px;
    /*color:#000;*/
}

</style>
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <include file="Public/sidebar"/>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs"/>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set"/>
                    <div class="row">
                    <div class="col-xs-12">
                        <div style="width:100%;margin-top:5px;">
                            <button class="layui-btn layui-btn-big layui-btn-normal" onclick="wei()">未评分学习成长</button>
                            <button class="layui-btn layui-btn-big layui-btn-danger" onclick="yi()">已评分学习成长</button>
                            <!-- <button class="layui-btn layui-btn-big " onclick="yi()">医院</button> -->
                        </div>
    
                        <div style="width:100%;height:1px;background-color:#000;margin-top:10px;"></div>
                        <!-- <form id="form" method="post" action="{:U('Shenp/ytong')}" style="margin-top:5%;"> -->
                        <table class="table table-hover" >
                            <thead>
                                <tr>
                                    <th class="center"><input class="check-all" type="checkbox" value=""></th>

                                    <!-- <th class="center">id</th> -->
                                    <th class="center">姓名</th>
                                    <th class="center">
                                        <?php if($ji == '1'): ?>
                                            <div class="layui-input-block" style="width:100px;margin-left:5%;" >
                                              <select name="interest" lay-filter="aihao" style="text-align:center;height:40px;" id="one">
                                                    <option value="0" >所属岗位/部门</option>
                                                <volist name="ment" id="k">
                                                    
                                                    <option value="{$k.ment}">{$k.ment}</option>
                                                </volist>
                                                
                                               
                                                
                                              </select>
                                            </div>
                                        <?php else: ?>
                                            所属部门
                                        <?php endif ?>
                                    </th>
                                    <th class="center">
                                        <div class="layui-input-block" style="width:100px;margin-left:17%;" >
                                          <select name="interest" lay-filter="aihao" style="text-align:center;height:40px;" id="tow">
                                                <option value="0">绩效开始时间</option>
                                            <volist name="j_yue" id="k">
                                                
                                                <option value="{$k.k_time}">{$k.k_time}</option>
                                            </volist>
                                            
                                           
                                            
                                          </select>
                                        </div>
                                    </th>
                                    <!-- <th class="center">所属岗位</th> -->
                                    <th class="center">战略目标</th>
                                    <th class="center">衡量指标</th>
                                    <th class="center">权重</th>
                                    <th class="center">目标值</th>
                                    <th class="center">计分规则</th>
                                    <th class="center">指标核算结果</th>
                                    <th class="center">标准分</th>
                                    <th class="center">考核得分</th>
                                    <th class="center">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php if($empty == 0): ?>
                                    <tr>
                                        <td colspan="14" class="center" style="font-size:19px;">暂无考核表</td>
                                    </tr>
                                <?php else: ?>
                                    <volist name="list" id="v">
                                        <!-- <form action="" id="formid"></form> -->
                                            <tr>
                                                <td class="center">
                                                    <input class="uids" type="checkbox" name="uids[]" value="{$v['id']}">
                                                </td>
                                                <!-- <td class="center">{$v.pid}</td> -->
                                                <td class="center">{$v.uname}</td>
                                                
                                                <td class="center">{$v.ment}</td>
                                                <td class="center">{$v.k_time}</td>
                                                <td class="center"><b>{$v.target}</b></td>
                                                <td class="center"><b>{$v.norm}</b></td>
                                                <td class="center"><b>{$v.weight}</b></td>
                                                <td class="center"><b>{$v.value}</b></td>
                                                <td class="center" style="width:250px;"><b>{$v.rule}</b></td>
                                                <td style="display:none">{$v.uname}</td>
                                                <td style="display:none">{$v.yue}</td>
                                                <?php if($v['result'] != '' && $v['standard'] != '' && $v['score'] != ''): ?>
                                                    <td class="center" style="color:#00a497">{$v.result}</td>
                                                    <td class="center" style="color:#00a497">{$v.standard}</td>
                                                    <td class="center" style="color:#00a497">{$v.score}</td>
                                                    <td class="center" style="color:#00a497">√已評分</td>
                                                    
                                                <?php else: ?>
                                                    <td class="center" ><input type="text" style="width:90px;"></td>
                                                    <td class="center"><input type="text" style="width:90px;"></td>
                                                    <td class="center"><input type="text" style="width:90px;"></td>
                                                    <td class="center"><div onclick="ti({$v.pid},this)" class="layui-btn layui-btn-danger layui-btn-radius">提交</div></td>
                                                <?php endif ?>
                                                <!-- <td class="center">{$v.post}</td> -->
                                               
                                                
                                               
                                            </tr>  
                                        <!-- </form> -->
                                    </volist>
                                <?php endif ?>
                                
                            </tbody>
                        </table>
                        <!-- </form> -->


                    </div>
                    </div>
                    
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer"/>

</div><!-- /.main-container -->

<include file="Public/footerjs"/>
<!-- inline scripts related to this page -->
<script src="__PUBLIC__/qwadmin/js/date-time/bootstrap-datepicker.js"></script>
<script src="__PUBLIC__/qwadmin/js/function.js"></script>
<script src="__PUBLIC__/layer/layer.js"></script>
<script type="text/javascript">

function yi()
{
    location.href="{:U('xuelist')}";
}

function ti(id,obj)
{   
    //衡量结果得分
    var score = $(obj).parent().prev().children().val();
    // result
    //标准分
    var standard = $(obj).parent().prev().prev().children().val();
    //得分
    var result = $(obj).parent().prev().prev().prev().children().val();
    //绩效月
    var yue = $(obj).parent().prev().prev().prev().prev().text();
    //被評分人
    var uname = $(obj).parent().prev().prev().prev().prev().prev().text();
    // console.log(result);

    // if (true) {}
    //询问框
    layer.confirm('确定提交么 ( ・◇・)？', {
      btn: ['确定','取消'] //按钮
    }, function(){
         $.ajax({
             type: "POST",
             url:"{:U('xue')}",
             data:{"id":id,"result":result,"standard":standard,'score':score,'yue':yue,'uname':uname},// 要提交的表单 
             beforeSend:function(){
                   layer.load(0, {shade: false});
                },
             success: function(msg) {
                // console.log(msg);
                if (msg == 1111) {
                    layer.msg('添加成功~', {icon: 1});
                    history.go(0); 
                }else{
                    layer.msg('添加失败！', {icon: 2});
                }
             },
             complete: function() {
                     layer.closeAll('loading');
                }
         });
     
    }, function(){
        layer.msg(' (｡・`ω´･) 再见');
    });   
   
}

</script>
</body>
</html>



  